if(typeof jQuery!=="function"){
    throw new Error("先引入jQuery");
}
/* $(function () {
        $.ajax({
            type: "GET",
            url: "json/1.json",
            success: function (data) {
                console.log(data);
            },
            error: function () {
                alert("网络故障");
            }
        })
    })*/
(()=>{$.ajax({
        type: "GET",
        url: "json/1.json",
        success: function (data) {
//            console.log(data);
            var html='';
            for(var p of data){
//                console.log(p);
                html+=`
                        <a href="#"  class="show">
                            <div class="imgShow"><img src="${p.src}" alt=""></div>
                            <div class="word">
                                <h2>${p.addr}</h2>
                                <h3>
                                    =&nbsp;
                                    <span>${p.word}</span>
                                    =
                                </h3>
                            </div>
                        </a>   
                `;
            }
            html+=`<p style="clear:both"></p>`
            $("#container>.first").html(html);
        },
        error: function () {
            alert("网络故障");
        }
    })
})()

